
<template>
  <div class="page">
    <div class="top">
      <div class="left">
        <div class="title">
          <div class="tabs-title2">
            <span style="margin-left: 20px; color: #2e61d7; font-weight: bold"
              >数据</span
            >
          </div>
        <div class="ipt">
            <input class="ipt2" type="text" placeholder="输入项目编号" />
          <span
            >
            <img class="img" src="@/assets/search.png"
          />
          </span>
        </div>
        </div>
        <div class="content">
                 <div class="e-tree-file">
          <div class="name">包件名称</div>

          <el-tree
            :data="data"
            :props="defaultProps"
            @node-click="handleNodeClick"
          ></el-tree>
        </div>
        </div>
      </div>
      <div class="right">
           <div class="title">
          <div class="tabs-title2">
            <span style="margin-left: 20px; color: #2e61d7; font-weight: bold"
              >已选</span
            >
          </div>

        </div>
            <div class="content">
                 <el-table :data="tableData" border fit style="width: 100%">
              <el-table-column prop="date" label="细目编号" width="200px">
              </el-table-column>
              <el-table-column prop="name" label="细目名称" width="411px">
              </el-table-column>
            </el-table>
            </div>
          </div>
    </div>
    <div class="bottom">
        <div class="left"></div>
      <div class="right">双击选择或取消数据
         <el-button type="mini">确定</el-button>
           <el-button type="mini" class="colse-btn">取消</el-button>
      </div>
    </div>
  </div>
</template>

<script>
export default {
    data () {
        return {
            data: [
                {
                    label: 'Lorem Ipsum1',
                    children: [
                        {
                            label: 'Lorem Ipsum1-1',
                            children: [
                                {
                                    label: 'Lorem Ipsum1-1-1',
                                },
                            ],
                        },
                    ],
                },
                {
                    label: 'Lorem Ipsum2',
                    children: [
                        {
                            label: 'Lorem Ipsum2-1',
                            children: [
                                {
                                    label: 'Lorem Ipsum2-1-1',
                                },
                            ],
                        },
                        {
                            label: 'Lorem Ipsum2-2',
                            children: [
                                {
                                    label: 'Lorem Ipsum2-2-1',
                                },
                            ],
                        },
                    ],
                },
                {
                    label: 'Lorem Ipsum3',
                    children: [
                        {
                            label: 'Lorem Ipsum3-1',
                            children: [
                                {
                                    label: 'Lorem Ipsum3-1-1',
                                },
                            ],
                        },
                        {
                            label: 'Lorem Ipsum3-2',
                            children: [
                                {
                                    label: 'Lorem Ipsum3-2-1',
                                },
                            ],
                        },
                    ],
                },
            ],
            defaultProps: {
                children: 'children',
                label: 'label',
            },
            tableData: [
                {
                    date: 'SAD11',
                    name: '直营经理部',
                },
                {
                    date: 'SAD11',
                    name: '直营经理部',
                },
                {
                    date: 'SAD11',
                    name: '直营经理部',
                },
                {
                    date: 'SAD11',
                    name: '直营经理部',
                },

            ],
        }
    },
    components: {},
    methods: {
        handleNodeClick () {},
    },
}
</script>

<style lang="scss" scoped>
.page {
  width: 70%;
  height: 70%;
  margin: auto;
  margin-top: 20px;
  display: flex;
  flex-direction: column;
//   border: 1px solid #ccc;
  .top {
    flex: 1;
    display: flex;
    margin-bottom: 20px;
    .left {
      width: 30%;
      display: flex;
      margin-right: 20px;

      flex-direction: column;
      .title {
        height: 30px;
        line-height: 30px;
        position: relative;
        display: flex;

        .tabs-title2::before {
          content: "";
          height: 22px;
          width: 8px;
          border-radius: 40px;
          background-color: #2e61d7;
          display: block;
          position: absolute;
          left: 0px;
          top: 3px;
        }
        .ipt{
            width: 200px;
            height: 30px;
            .ipt2 {
          height: 23px;
          border-radius: 5px;

          margin-bottom: 15px;
          margin-left: 45px;
          cursor: pointer;
          border: 1px solid #ccc;
        }
        .img {
          width: 15px;
          height: 15px;
          position: absolute;
          top: 10px;
          right: 27px;
          cursor: pointer;
        }
        ::placeholder {
          color: #cccc;
          padding-left: 10px;
        }
        }
      }
      .content {
        flex: 1;
        margin-top: 20px;
        .name {
        height: 48px;
        line-height: 40px;
        text-align: center;
        font-weight: 700;

        background-color: rgb(224, 231, 249);
      }
      }
    }
    .right {
      width: 70%;
      line-height: 30px;
        display: flex;
        flex-direction: column;
        .title{
            height: 30px;
           line-height: 30px;
            position: relative;
             .tabs-title2::before {
                content: "";
                height: 22px;
                width: 8px;
                border-radius: 40px;
                background-color: #2e61d7;
                display: block;
                position: absolute;
                left: 0px;
                top: 3px;
              }
        }
        .content {
            margin-top: 20px;
        flex: 1;
            ::v-deep.has-gutter th {
            background: #e0e7f9 !important;
            color: #000;
          }
          ::v-deep.el-table--enable-row-hover .el-table__body tr:hover {
            font-weight: bold;
          }
          ::v-deep.el-table ::v-deep .el-table__expand-icon--expanded {
            transform: none;
          }
          ::v-deep.el-tree ::v-deep .el-tree-node__expand-icon.expanded {
            -webkit-transform: rotate(0deg);
            transform: rotate(0deg);
          }
          ::v-deep.cell {
            display: flex;
            align-items: center;
          }
      }

    }
  }
  .bottom {
    height: 50px;
     display: flex;
    margin-top: 20px;
    background-color: rgb(239, 242, 246);
    .left{
      width: 65%;
      height: 50px;

    }
    .right{
      line-height: 50px;
      font-weight: 500;
      color: rgb(233, 84, 66);
      font-size: 14px;
    .colse-btn{
      background-color: #fff;
      color: #000;
    }
    }
    ::v-deep.el-button--mini{
      width: 60px;
      color: #fff;
      margin-left: 10px;
      background-color: rgb(46, 97, 215);
    }
  }
}
</style>
